package com.cyclingAssistant.project;

import android.app.TabActivity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.Gravity;
import android.widget.TabHost;
import android.widget.TextView;

public class Options extends TabActivity {
	public void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		setContentView(R.layout.options);

		TabHost tabHost = getTabHost(); // The activity TabHost
		TabHost.TabSpec spec; // Resusable TabSpec for each tab
		Intent intent; // Reusable Intent for each tab

		// Create an Intent to launch an Activity for the tab (to be reused)
		intent = new Intent().setClass(this, SavedRoutes.class);

//		TextView txtRoute = new TextView(this);
//		txtRoute.setText("saved routes");
//		txtRoute.setTextSize(14);
//		txtRoute.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL);
		// Initialize a TabSpec for each tab and add it to the TabHost
		spec = tabHost.newTabSpec("route management").setIndicator("saved routes")
				.setContent(intent);
		tabHost.addTab(spec);

		// Do the same for the other tabs
//		TextView txtAddress = new TextView(this);
//		txtAddress.setText("address book");
//		txtAddress.setTextSize(14);
//		txtAddress.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL);
		intent = new Intent().setClass(this, AddressManage.class);
		spec = tabHost.newTabSpec("address book").setIndicator("address book")
				.setContent(intent);
		tabHost.addTab(spec);

		tabHost.setCurrentTab(0);

	}
}
